---
title: Model as String
sidebarTitle: Model as String
description: Use the convenient provider:model_id string format to specify models without importing model classes.
---

## Introduction

Agno provides a convenient string syntax for specifying models using the `provider:model_id` format. This approach reduces code verbosity by eliminating the need to import model classes while maintaining full functionality.

Both the traditional object syntax and the string syntax are equally valid and work identically. Choose the approach that best fits your coding style and requirements.

## Format

The string format follows this pattern:

```
"provider:model_id"
```

- **provider**: The model provider name (case-insensitive)
- **model_id**: The specific model identifier

**Examples:**
- `"openai:gpt-4o"`
- `"anthropic:claude-sonnet-4-20250514"`
- `"google:gemini-2.0-flash-exp"`
- `"groq:llama-3.3-70b-versatile"`

## Basic Usage

### Agent with String Syntax

```python
from agno.agent import Agent

agent = Agent(
    model="openai:gpt-4o",
    instructions="You are a helpful assistant.",
    markdown=True,
)

agent.print_response("Share a 2 sentence horror story.")
```

### Teams with String Syntax

Use model strings with Teams for coordinated multi-agent workflows:

```python
from agno.agent import Agent
from agno.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools

web_agent = Agent(
    name="Web Agent",
    role="Search the web for information",
    model="openai:gpt-4o",
    tools=[DuckDuckGoTools()],
)

finance_agent = Agent(
    name="Finance Agent",
    role="Analyze financial data",
    model="openai:gpt-4o-mini",
)

agent_team = Team(
    members=[web_agent, finance_agent],
    model="openai:gpt-4o",
    instructions="Coordinate research and provide comprehensive reports.",
)

agent_team.print_response("Research Tesla's latest developments")
```

### Multiple Model Types

Agents support different models for various purposes:

```python
from agno.agent import Agent

agent = Agent(
    # Main model for general responses
    model="openai:gpt-4o",
    # Reasoning model for complex thinking
    reasoning_model="anthropic:claude-sonnet-4-20250514",
    # Parser model for structured outputs
    parser_model="openai:gpt-4o-mini",
    # Output model for final formatting
    output_model="openai:gpt-4o",
)
```

T## Common Providers


| Provider | String Format | Example |
|----------|---------------|---------|
| OpenAI | `openai:model_id` | `"openai:gpt-4o"` |
| Anthropic | `anthropic:model_id` | `"anthropic:claude-sonnet-4-20250514"` |
| Google | `google:model_id` | `"google:gemini-2.0-flash-exp"` |
| Groq | `groq:model_id` | `"groq:llama-3.3-70b-versatile"` |
| Ollama | `ollama:model_id` | `"ollama:llama3.2"` |
| Azure AI Foundry | `azure-ai-foundry:model_id` | `"azure-ai-foundry:gpt-4o"` |
| Mistral | `mistral:model_id` | `"mistral:mistral-large-latest"` |
| LiteLLM | `litellm:model_id` | `"litellm:gpt-4o"` |
| OpenRouter | `openrouter:model_id` | `"openrouter:anthropic/claude-3.5-sonnet"` |
| Together | `together:model_id` | `"together:meta-llama/Llama-3-70b-chat-hf"` |

For the complete list and provider-specific documentation, see the [Models Overview](/concepts/models/overview).

